package com.qf.springBeanLifecyleDemo.dao.impl;

import com.qf.springBeanLifecyleDemo.dao.UserDao;
import com.qf.springBeanLifecyleDemo.entity.User;

/**
 * @author 刘欣
 * @createTime 2022/12/28 18:55
 * @description
 */
public class UserDaoImpl implements UserDao {
    private User user;

    @Override
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        System.out.println("userSet依赖注入");
        this.user = user;
    }

    public void init() {
        System.out.println("UserDaoImpl对象初始化方法");
    }

    public void destroy() {
        System.out.println("UserDaoImpl对象销毁对象的方法");
    }
}
